home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 051-075 / scopedisk70 / pcalc / pcalc.doc < prev    next >
Text File  |  1995-03-19  |  10KB  |  273 lines

  1.  
  2. Programmer's Calculator (PCalc)
  3. A programmer's utility from Eggers ShareWare
  4.  
  5. ------------------------------------------------------------------------------
  6. Purchase price: $5
  7. ------------------------------------------------------------------------------
  8.  
  9.                      Copyright (C) 1987 Joseph A. Eggers
  10.                              All rights reserved
  11.  
  12.          If you decide to keep this product, send the purchase price to
  13.  
  14.                   Eggers Shareware
  15.                   404 Emmet Avenue
  16.                  Ferguson, MO 63135
  17.  
  18.  If you decide not to keep this product, delete or give away all copies of it.
  19.  
  20. ------------------------------------------------------------------------------
  21.  
  22. Special Deal
  23.  
  24. If you own (and have purchased) any other calculator from Eggers ShareWare, you
  25. may keep the Programmer's Calculator without further remittance. Consider it
  26. part of a package.  Please register your ownership of the new calculator
  27. though, so you will receive new product and update information.
  28.  
  29. If you do own others and you have not purchased them, why not do it now?
  30.  
  31. -------------------------------------------------------------------------------
  32.  
  33. Registration
  34.  
  35. If you would like to be registered as a user of this product, please include
  36. the following information with your payment:
  37.  
  38.     Name
  39.     Address
  40.     Product and version number
  41.     Where you got the product (optional)
  42.     Comments/suggestions      (optional)
  43.     
  44. Registered users will receive notification of updates and new products.
  45.  
  46. ===============================================================================
  47.  
  48. Programmer's Calculator
  49.  
  50.  
  51. Features
  52.  
  53.  * base conversion: binary, octal, decimal, hexadecimal
  54.  
  55.  * bit level logic functions: AND, NOT, OR, NOR, NAND, XOR
  56.  
  57.  * left-shift and right-shift functions (shift one bit) 
  58.  
  59.  * choice of working with signed or unsigned numbers
  60.  
  61.  * math functions, including MOD (remainder after integer division)
  62.  
  63.  * memory store, recall, add and subtract
  64.  
  65.  * keyboard or mouse operation
  66.  
  67.  * online help screen
  68.  
  69.  
  70. Starting the calculator
  71.  
  72.  To use the calculator from the Workbench, simply click twice on the PCalc
  73.  icon.
  74.  
  75.  To use the calculator from a CLI, type PCALC or RUN PCALC if the calculator
  76.  is in the directory that is the current directory.
  77.  
  78.  If the calculator is in a directory that is not the current directory, you
  79.  will have to type the directory name in front of PCALC, as in RUN DF1:PCALC
  80.  
  81.  
  82. Ending the calculator
  83.  
  84.  To quit using the calculator, you may do one of three things:
  85.    1) click in the close window gadget at the upper left of the calculator
  86.    2) press the ESC key when the calculator is the current window
  87.    3) hold down the CTRL key, then press the C key when the calculator is 
  88.       the current window
  89.  
  90.  If the help screen is displayed when you close the calculator window,
  91.  the help screen will go away also.
  92.  
  93.  
  94. Using calculator functions
  95.  
  96.   Entering numbers
  97.   
  98.   Numbers can be entered by clicking on the key representing the number you
  99.   want to enter.  Depending on what numeric base the calculator is in at 
  100.   the time, some keys may not enter anything.  If you are using octal numbers
  101.   for instance, pressing the 8, 9, A, B, C, D, E, and F keys will have no
  102.   effect.
  103.   
  104.   Note that there is NO indication of overflow when it occurs.  This is
  105.   because the calculator is intended to show you precisely what actually
  106.   happens to a numeric value when operations are done to it.  If you are
  107.   interested in the fact that an overflow has occurred, you can just watch
  108.   it happen in the display.
  109.  
  110.  
  111.   Math functions
  112.   
  113.   The mathematical functions provided are addition (+), subtraction (-), 
  114.   multiplication (*), integer division (/), and remainder after integer
  115.   division (MOD).  These all operate like you would expect.  Enter the
  116.   first operand, then the math key, then the second operand, then the
  117.   equals key.  The result of the operation is displayed in the window in
  118.   whatever base you are working in.
  119.   
  120.   
  121.   Bit-level logic functions
  122.   
  123.   These functions are of two kinds: ones that operate on two numbers, the
  124.   way math functions work, and ones that operate on just one number.  The two
  125.   number variety are called BINARY operations (no relation to being in BIN
  126.   display mode) and the one number variety are called UNARY operations.
  127.   
  128.     Binary operations
  129.     
  130.     The bit level binary operations are AND, OR, XOR, NOR, and NAND.  You
  131.     use these the same way as you use any of the math functions. 
  132.     
  133.     Unary Operations
  134.     
  135.     The bit level unary operations are NOT, left shift ( << ), and right
  136.     shift ( >> ).  These operate on whatever value is in the display at
  137.     the time you do the operation.  The NOT operation reverses the value of
  138.     every bit in the number, which is real obvious if you are in BIN display
  139.     mode, but not so obvious if you aren't.  The shift operations shift 
  140.     all the bits in the number one to the left or to the right.  Bits shifted
  141.     "off the end" are lost forever.  When using signed numbers, the sign bit
  142.     (high order bit) will be propagated when you shift right.
  143.   
  144.   
  145.   Signed and Unsigned Numbers
  146.   
  147.   Using the S and U keys you can select whether you want to use signed or
  148.   unsigned numbers.
  149.  
  150.   When using signed numbers, the high order bit of the number is interpreted
  151.   as a sign bit, rather than as part of the number. A one means the number is
  152.   negative, a zero means the number is positive. This obviously limits the size
  153.   of the number to whatever can be stored in 31 bits.  When using signed 
  154.   numbers, the sign bit will be propagated when you shift right.
  155.   
  156.   When using unsigned numbers, all 32 bits are used to store the number, which
  157.   then must always be positive.  Using that high order bit in the number allows
  158.   a value to be stored that is twice as large as the largest number that can
  159.   be stored as a signed number.
  160.   
  161.   One of the S or the U keys will be highlighted to show you whether you
  162.   are using signed or unsigned numbers.  The highlighted key will have its
  163.   text in a different color than the numeric keys on the calculator.
  164.   
  165.  
  166.   Numeric base conversions
  167.   
  168.   The calculator can work in any of four numeric bases: base 2 (binary),
  169.   base 8 (octal), base 10 (decimal), and base 16 (hexadecimal).  Converting
  170.   between the bases is accomplished by clicking on the key representing the
  171.   base you want to work in.  The base you are in determines which of the
  172.   numeric keys are usable.  If you are in base 2 for instance, none of the
  173.   numeric keys higher than 1 are usable, because only the digits 0 and 1 are
  174.   meaningful in base 2.
  175.   
  176.   The key for the numeric base you are working in is displayed in a different
  177.   color than the others.
  178.   
  179.   
  180.   The calculator's memory
  181.   
  182.   The calculator has a single memory where you can store a value for later
  183.   recall or for calculations while it is still in memory.
  184.  
  185.   A number is stored in memory by pressing the M key.  Whatever value is 
  186.   displayed currently will be copied into the memory.  Whenever the memory has
  187.   something in it, the M key will be highlighted to tell you it's there.
  188.   
  189.   A number is recalled from memory by pressing the MR key.  Whatever value
  190.   was in memory is copied to the display, and the value in the display is
  191.   lost.  The value that was in memory stays in memory.
  192.   
  193.   To add or subtract the value in the display with the value in the memory,
  194.   press the M+ or M- key.  The result of the operation will be stored the
  195.   memory, and the display value will not change.
  196.   
  197.   To clear the memory, press M when there is a zero in the display.
  198.   
  199.   
  200.   The Clear keys
  201.   
  202.   To clear the last value entered, press the CE key.  To clear everything in
  203.   the calculator except the memory, press the CA key.
  204.   
  205.   
  206.   Changing the sign of the display
  207.   
  208.   To change the sign of the value in the display, press the +- key.  If you
  209.   are using unsigned numbers, this key has no effect.  Note that when you
  210.   in decimal mode, the change of sign is indicated by the presence or absence
  211.   of the negative sign to the left of the number, but when you are using a
  212.   different numeric base the change in sign is indicated by flipping the
  213.   high order sign bit and then propagating it.
  214.   
  215.   
  216.   Getting Help
  217.   
  218.   Pressing the HELP key will display a window showing the keys on the keyboard
  219.   that you can use as alternatives to the calculator keys.  You can leave this
  220.   window displayed while you continue to use the calculator.  To close the help
  221.   window, use its close window gadget.  This will not end the calculator.  If 
  222.   the help window is still displayed when you quit using the calculator, it 
  223.   will be closed automatically.
  224.   
  225.  
  226. Using the keyboard with the calculator
  227.  
  228. All of the keys on the calculator can be pressed by using the mouse or by
  229. pressing an alternative key on the keyboard. The following table shows which
  230. keyboard keys relate to which calculator keys.  You can view this information
  231. while using the calculator by viewing the help screen.  In general though, most
  232. keys with a single character on them can be pressed by pressing that character
  233. key on the keyboard.
  234.  
  235.         CALCULATOR      KEYBOARD
  236.         ------------------------
  237.         0 - F           0 - F
  238.         =               =, RETURN, or ENTER
  239.         +, -, /, *      +, -, /, *
  240.         S               S 
  241.         U               U
  242.         MOD             %
  243.         <<              <
  244.         >>              >
  245.         BIN             CTRL-B    the up and down arrow keys can also
  246.         OCT             CTRL-O    be used to go from one numeric base
  247.         DEC             CTRL-D    to another.
  248.         HEX             CTRL-H
  249.         AND             &
  250.         OR              |
  251.         NOT             !
  252.         XOR             X
  253.         NAND            #
  254.         NOR             $
  255.         About           ?
  256.         M               M
  257.         MR              R
  258.         M+              [
  259.         M-              ]
  260.         +-              P
  261.         CA              K (think of "K"ill)
  262.         C               DEL
  263.         quit PCALC      ESC or CTRL-C
  264.         HELP            HELP
  265.  
  266. -------------------------------------------------------------------------------
  267.  
  268.                              Eggers Shareware
  269.                              404 Emmet Avenue
  270.                             Ferguson, MO 63135
  271.  
  272. -------------------------------------------------------------------------------
  273.